public class WeightedEdge extends AbstractGraph.Edge implements Comparable<WeightedEdge> {
    public double weight;

    public WeightedEdge(int u, int v, double weight) {
        super(u, v);
        this.weight = weight;
    }

    @Override
    public int compareTo(WeightedEdge e) {
        return Double.compare(weight, e.weight);
    }
}